import request from '@/utils/request'

// 查询西湖城管-投诉列表
export function listComplaint(query) {
  return request({
    url: '/xhcg/complaint/list',
    method: 'get',
    params: query
  })
}

// 查询西湖城管-投诉类型列表
export function getXhcgComplaintTypeList(query) {
  return request({
    url: '/xhcg/complaint/getXhcgComplaintTypeList',
    method: 'get',
    params: query
  })
}
// 查询部门下拉树结构
export function deptTreeselect() {
  return request({
    url: '/xhcg/complaint/deptTreeselect/',
    method: 'get',
  })
}

// 查询西湖城管-投诉详细
export function getComplaint(id) {
  return request({
    url: '/xhcg/complaint/' + id,
    method: 'get'
  })
}

// 新增西湖城管-投诉
export function addComplaint(data) {
  return request({
    url: '/xhcg/complaint',
    method: 'post',
    data: data
  })
}

// 修改西湖城管-投诉
export function updateComplaint(data) {
  return request({
    url: '/xhcg/complaint',
    method: 'put',
    data: data
  })
}

// 删除西湖城管-投诉
export function delComplaint(id) {
  return request({
    url: '/xhcg/complaint/' + id,
    method: 'delete'
  })
}

// 发布西湖城管-投诉
export function issueComplaint(id,issueStatus) {
  return request({
    url: '/xhcg/complaint/issueComplaint',
    method: 'get',
    params: {id:id,issueStatus:issueStatus}
  })
}

// 导出西湖城管-投诉
export function exportComplaint(query) {
  return request({
    url: '/xhcg/complaint/export',
    method: 'get',
    params: query
  })
}
